Skip to content

Add PEP slash command - #3544

Open
Sacul0457 wants to merge 5 commits into
python-discord:mainfrom
Sacul0457:pep-slash-command
Open

Add PEP slash command#3544
Sacul0457 wants to merge 5 commits into
python-discord:mainfrom
Sacul0457:pep-slash-command

Conversation

@Sacul0457

@Sacul0457 Sacul0457 commented Aug 1, 2026

Copy link
Copy Markdown

Notes:

  • I set the limit to 10 as I think 25 would be too many and clutter the screen
  • I have not tested the code
  • get_pep_embed needs a better name...

Issue: #3543

@ChrisLovering ChrisLovering left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice change, a few comments, also I'd suggest installing the pre-commit hooks so that your changes get linted when you commit uv run pre-commit install

Comment thread bot/exts/info/pep.py Outdated
Comment thread bot/exts/info/pep.py Outdated
@Sacul0457

Copy link
Copy Markdown
Author

Thanks for approving!

Someone should probably test this to see if it works tho

@jb3 jb3 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works fine from local testing, just one comment and the below

One thing that would be nice to change: if a user is filling out the autocomplete and enters a number (e.g. 522) it'd be nice to shortcut and put that PEP to the top of the suggestion list, right now it tries to fuzzy find on it which means the results don't appear in the list at all.

Image

Ideally, we either add the result to the top of the list when a match is entered here, or we return only that PEP (only fuzzy finding when there are letters or spaces in the text).

Comment thread bot/exts/info/pep.py Outdated

@jb3 jb3 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Meant to request changes, oops.

@Sacul0457

Copy link
Copy Markdown
Author

Done! I've chose to implement this:

return only that PEP (only fuzzy finding when there are letters or spaces in the text).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants